home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 90 / CD Actual 90.iso / Software3D / VirtualLight / VLight1.3win32.exe / Examples / Level1 / FunctionalSurf4.vs < prev    next >
Encoding:
Text File  |  2002-10-07  |  943 b   |  26 lines

  1. ReadArchive "defshaders.vs"
  2.  
  3. static stone_colors = SpectrumOfColors(
  4.     [0.0, '0.988236,0.792157,0.0', 0.1, '0.988236,0.792157,0.0']
  5.     [0.1, '0.890, 0.651, 0.612', 0.2, '1.000, 0.820, 0.675']
  6.     [0.2, '0.980392,0.8,0.682353', 0.3, '0.980392,0.8,0.682353']
  7.     [0.3, '0.890, 0.643, 0.612', 0.4, '0.937, 0.729, 0.561']
  8.     [0.4, '0.847059,0.67451,0.533333', 0.5, '1.0,0.635294,0.0']
  9.     [0.5, '0.878, 0.604, 0.565', 0.6, '0.984, 0.780, 0.655']
  10.     [0.6, '1.0,0.635294,0.0', 0.7, '0.988235,0.792157,0.0']
  11.     [0.7, '0.984, 0.780, 0.655', 0.8, '1.000, 0.863, 0.635']
  12.     [0.8, '1.000, 0.863, 0.635', 0.9, '1.000, 0.765, 0.620']
  13.     [0.9, '1.0,1.0,1.0', 1.001, '1.0,1.0,1.0'])
  14.  
  15. static Worley = voronoi(Po,7)
  16.  
  17. Declare mystone = Shader [ FunctionalSurface [
  18.  Color stone_colors[Worley]
  19.  Kd 0.75
  20.  Ks(0.4 + 0.5*pow(Worley,4), '1,1,1')
  21.  PhongSpecularBRDF 10*(1.0 - Worley)
  22.  Iridescence(.25,.3,.3)
  23.  ]
  24.  Scale(0.5, 0.5, 0.5)
  25. ]
  26.